
<link rel="stylesheet" href="/public/library/tooltip/css/jquery.css">
<script src="/public/library/tooltip/js/jquery.js" type="text/javascript"></script>
<script src="/public/library/tooltip/js/jquery_002.js" type="text/javascript"></script>
<br />
		    <div class="clear"></div>
			<div class="blog_friend">
				<div class="blog_friend_bar"><?=t(5007)?></div>
				<div class="blog_friend_content">
					<? $countFriend = count($this->viewParams['user']);?>
					<div class="blog_friend_content">
						<?$avatar = APP_PATH."/public/ufiles/%d/images/%s/avatar/avatar.jpg";?>
						<?for($i=0;$i<min(9,$countFriend);$i++){?>
						<div class="blog_friend_img">
						<?
						if(isset($this->viewParams['user'][$i]['id']) && file_exists(sprintf($avatar, $this->viewParams['user'][$i]['id'] , "medium"))){
							$temp = sprintf($avatar, $this->viewParams['user'][$i]['id'] , "medium");
						}elseif(isset($this->viewParams['user'][$i]['id']) &&  file_exists(sprintf($avatar, $this->viewParams['user'][$i]['id'] , "small"))){
							$temp = sprintf($avatar, $this->viewParams['user'][$i]['id'] , "small");
						}else $temp = sprintf($avatar, 0 , "small");
						?>
			
						<?//$temp = sprintf($avatar, $this->viewParams['user'][$i]['id'] , "small");?>
						<a title = "<?=$this->viewParams['user'][$i]['name']?>" href="<?=$this->hvnUrl(array('action' => 'view'), 'account')?>?id=<?=$this->viewParams['user'][$i]['id']?>">
							<?if(isset($temp)):?>
								<img id="tonus<?=$i?>" src="<?=$temp;?>" align="absmiddle">
							
								<script type="text/javascript">
								$(function() {
								$('#tonus<?=$i?>').tooltip({
									delay: 0,
									showURL: false,
									bodyHandler: function() {
										return $("<img/>").attr("src", this.src);
									}
								});
								});
								</script>


							<?else:?>
								<img  src="<?=sprintf($avatar, 0, "small");?>" align="absmiddle">
							<?endif?>
						</a>
						<div class="clear"></div>
						<a title = "<?=$this->viewParams['user'][$i]['name']?>" href="<?=$this->hvnUrl(array('action' => 'view'), 'account')?>?id=<?=$this->viewParams['user'][$i]['id']?>">
							<?=substr($this->viewParams['user'][$i]['name'],0 ,6);?>
							<?if(strlen($this->viewParams['user'][$i]['name'])>6)
								echo '..';
							?>
						</a>
						</div>
						<?}?>
					</div>
				</div>	
			</div>
			<div class="clear"></div>	
